Rail Fence Cipher










Rail Fence

The simplest cipher is the rail fence technique, in which the plaintext is written down as a sequence of diagonals and then read off as a sequence of rows.

A transposition cipher, also known as a zigzag cipher. Named for its encoding method based on rail-like patterns.

Steps:

1- Write the plaintext in a sequence of diagonals.
2- Read off the diagonals as rows.

Example: